<template>
    <div>
        <el-row>
            <el-col :span="4">
                <div class="menu">
                    <el-menu
                        default-active="1"
                        class="el-menu-vertical-demo"
                        @select="handleSelect">
                        <el-menu-item index="1">
                            <i class="el-icon-ice-cream-round"></i>
                            <span slot="title">图片配置</span>
                        </el-menu-item>
                        <el-menu-item index="2">
                            <i class="el-icon-ice-cream-square"></i>
                            <span slot="title">协议配置</span>
                        </el-menu-item>
                        <el-menu-item index="3">
                            <i class="el-icon-milk-tea"></i>
                            <span slot="title">菜单配置</span>
                        </el-menu-item>
                    </el-menu>
                </div>
            </el-col>
            <el-col :span="20">
                <div class="content">
                    <mnp-config size="small" mode="list" v-if="index == 1"></mnp-config>
                    <mnp-agreement size="small" mode="list" v-if="index == 2"></mnp-agreement>
                    <mnp-menu size="small" mode="list" v-if="index == 3"></mnp-menu>
                </div>
            </el-col>
        </el-row>
    </div>
</template>

<script>
import MnpConfig from "@/component/MnpConfig";
import MnpAgreement from "@/component/MnpAgreement";
import MnpMenu from "@/component/MnpMenu";

export default {
    name: "MnpConfigPage",
    components: {MnpConfig, MnpAgreement, MnpMenu},
    data() {
        return {
            index: 1,

        }
    },
    methods: {
        handleSelect(key, keyPath) {
            console.log(key);
            this.index = key;
        },
    },
    created() {
    },
}
</script>

<style scoped>
.el-input {
    width: 150px !important;
}

.el-select {
    width: 150px !important;
}

.menu {
    border: 1px solid #EBEEF5;
}
.content {
    margin-left: 2px;
    padding-left: 10px;
    border: 1px solid #EBEEF5;
}
.el-menu {
    border: 0;
}
</style>
